import request from '@/utils/request'
import { download } from '@/utils/request'

// 新增认证信任度套餐
export function addTrust(data) {
  return request({
    url: '/businessCore/faTrustPlan',
    method: 'post',
    data
  })
}

// 修改认证信任度套餐
export function updateTrust(data) {
  return request({
    url: '/businessCore/faTrustPlan',
    method: 'put',
    data
  })
}

// 删除认证信任度套餐
export function delTrust(id) {
  return request({
    url: '/businessCore/faTrustPlan/' + id,
    method: 'delete'
  })
}

// 导出认证信任度套餐
export function exportTrust(params, fileName) {
  const url = '/businessCore/faTrustPlan/export'
  download(
    url,
    params,
    fileName + `_${new Date().getTime()}.xlsx`
  )
}